function triangleAnime (t, w, ra, co, lo) {
    var co1, co2, op = 0;
    if (t && typeof t === "object" && !w && t.element) co = t.color, lo = t.size, ra = t.ratio, w = t.window, t = t.element;
    if (w == undefined) w = t;
    else if (typeof w === "number") lo = co , co = ra, ra = w, w = t;
    else if (typeof w === "object" && w.length > 2) lo = ra , ra = co, co = w, w = t;
    if (ra && typeof ra === "object" && ra.length > 2) { var t1 = lo; lo = co, co = ra, ra = t1 }
    if (ra == undefined || ra <= 0) ra = 1; if (lo == undefined) lo = 1;
    if (co && typeof co === "object" && co.length > 2) {
        if (co.length > 3) op = co[3] >= 0 ? co[3] - 1 : co[3];
        co1 = "rgba("+co[0]+","+co[1]+","+co[2]+",", co2 = "rgba("+co[0]+","+co[1]+","+co[2]+","+(op+.9)+")";
    }
    else co1 = "rgba(0,0,0,", co2 = "rgba(0,0,0,.9)";
    function n () {
        t.width = ra * (t.offsetWidth || window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth),
        t.height = ra * (t.offsetHeight || window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight);
    }
    function e () {
        i.clearRect(0, 0, t.width, t.height);
        var n = [a].concat(m);
        m.forEach(function (e) {
            e.x += e.xa, e.y += e.ya, e.xa *= e.x > t.width ||
            e.x < 0 ? -1 : 1, e.ya *= e.y > t.height ||
            e.y < 0 ? -1 : 1, i.fillStyle = co2, i.fillRect(e.x - .5, e.y - .5, lo, lo);
            for (var o = 0; o < n.length; o++) {
                var m = n[o];
                if (e !== m && null !== m.x && null !== m.y) {
                    var d, u = e.x - m.x, c = e.y - m.y, r = u * u + c * c;
                    r < m.max && (m === a && r >= m.max / 2 && (e.x -= .03 * u, e.y -= .03 * c),
                    d = (m.max - r) / m.max, i.beginPath(), i.lineWidth = d / 2, i.strokeStyle = co1 + (d+op+.2) + ")",
                    i.moveTo(e.x, e.y), i.lineTo(m.x, m.y), i.stroke())
                }
            }
            n.splice(n.indexOf(e), 1);
        }), window.triangleAnimeFN = start(e);
    }
    var i = t.getContext("2d"), a = { x:null, y:null, max:2e4 }; n(), window.onresize = n;
    var start = function () {
        return window.requestAnimationFrame || window.webkitRequestAnimationFrame ||
            window.mozRequestAnimationFrame || window.oRequestAnimationFrame ||
            window.msRequestAnimationFrame || function (n) { window.setTimeout(n, 1e3 / 60) };
    }(),
    stop = function () {
        return window.cancelAnimationFrame || window.webkitCancelAnimationFrame || 
            window.mozCancelAnimationFrame || window.oCancelAnimationFrame ||
            window.msCancelAnimationFrame || function () { return };
    }();
    w.onmousemove = function (n) {
        n = n || window.event, a.x = n.clientX * ra, a.y = n.clientY * ra;
    },
    w.ontouchmove = function (n) {
        n = n || window.event, a.x = n.touches[0].clientX * ra, a.y = n.touches[0].clientY * ra;
    },
    w.onmouseout = function (n) {
        a.x = null, a.y = null;
    };
    for (var m = [], d = 0; 150 > d; d++) {
        var u = Math.random() * t.width, c = Math.random() * t.height, r = 2 * Math.random() - 1, l = 2 * Math.random() - 1;
        m.push({ x:u, y:c, xa:r, ya:l, max:6e3 });
    }
    stop(window.triangleAnimeFN), e();
}